package com.pine.dbant.common.plugin;

import com.pine.sunflower.core.LifeCycled;

import java.util.List;

/**
 * @author xiaoyuan
 * @create 2022/11/8
 **/
public interface PluginFactory extends LifeCycled {

    /**
     * 注册插件
     *
     * @param plugin
     */
    void registerPlugin(Plugin plugin);

    /**
     * 获取某个插件对象
     *
     * @param name
     * @param name
     * @return
     */
    Plugin getPlugin( String name);

    /**
     * 获取某个插件信息
     *
     * @param name
     * @return
     */
    PluginMeta getPluginMeta( String name);

    /**
     * 获取某个类型的插件信息
     *
     * @param pluginType
     * @return
     */
    List<PluginMeta> getPlugins(PluginType pluginType);


}
